/*******************************************************************************
 * Copyright (c) 2007 TOPCASED. All rights reserved. This program
 * and the accompanying materials are made available under the terms of the
 * Eclipse Public License v1.0 which accompanies this distribution, and is
 * available at http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors: Topcased contributors and others - initial API and implementation
*******************************************************************************/

package fr.insatoulouse.uvmanager.grb.uvmanager;

//Start of user code for imports
//End of user code for imports
/**
 * 
 * @author
 */
public class Assignment  {

    //Attributes
    private Integer id;
    private String teacher;
    private AssignmentStatus validated;
    private Integer amount;
    private LectureType type;
    private Integer uvID;


    //Start of user code for the default constructor
    /**
     * Default constructor
     */
    public Assignment (int id, String teacher,String validated, int amount, String type,int uvId){
        //Attributes
        this.id = id;
        this.teacher = teacher;
        this.validated = AssignmentStatus.valueOf(validated);
        this.amount = amount;
        this.type = LectureType.valueOf(type);
        this.uvID = uvId;
    }
    //End of user code for the default constructor

    //Accessors

    public Assignment() {
	}

	/**
     * Return id
     * @return int
     */	
    public int getId(){
        return this.id;
    }	

    /**
     * Set the value of id.
     * @param myid 
     */
    public void setId(int myid){
        this.id = myid;
    }	

    /**
     * Return teacher
     * @return String
     */	
    public String getTeacher(){
        return this.teacher;
    }	

    /**
     * Set the value of teacher.
     * @param myteacher 
     */
    public void setTeacher(String myteacher){
        this.teacher = myteacher;
    }	

    /**
     * Return validated
     * @return AssignmentStatus
     */	
    public AssignmentStatus getValidated(){
        return this.validated;
    }	

    /**
     * Set the value of validated.
     * @param myvalidated 
     */
    public void setValidated(AssignmentStatus myvalidated){
        this.validated = myvalidated;
    }	

    /**
     * Return amount
     * @return int
     */	
    public int getAmount(){
        return this.amount;
    }	

    /**
     * Set the value of amount.
     * @param myamount 
     */
    public void setAmount(int myamount){
        this.amount = myamount;
    }	

    /**
     * Return type
     * @return LectureType
     */	
    public LectureType getType(){
        return this.type;
    }	

    /**
     * Set the value of type.
     * @param mytype 
     */
    public void setType(LectureType mytype){
        this.type = mytype;
    }	

    /**
     * Return uvID
     * @return int
     */	
    public int getUvID(){
        return this.uvID;
    }	

    /**
     * Set the value of uvID.
     * @param myuvID 
     */
    public void setUvID(int myuvID){
        this.uvID = myuvID;
    }	


    //Start of user code for main	
    /*public static void main (String[] args) {	
    }
    
    
    private Integer id;
    private String teacher;
    private AssignmentStatus validated;
    private Integer amount;
    private LectureType type;
    private Integer uvID;
    */
    
    public String toString(){
		String res = "\tAssignmentID : "+id+"\t";
		res += "UVID : "+uvID+"\t";
		res += "Teacher : "+teacher +"\n";
		res += "\tLectureType : "+type+"\t";
		res += "Amount : "+amount+"\n";
		res += "\tAssignmentStatus : "+validated+"\n";
		return res;
    	
    }
    //End of user code
	
}
